﻿using System;
using System.Collections.Generic;

namespace IceCS.DesignPattern.Core.NullObjectPattern.CustomerInfoManage
{
    public static class CustomerFactory
    {
        public static List<string> Names = new List<string>
        {
            "Rob", "Joe", "Julie"
        };
        public static AbstractCustomer GetCustomer(String name)
        {
            foreach (string defautlName in Names)
            {
                if (defautlName.Equals(name))
                {
                    return new RealCustomer(name);
                }
            }
            return new NullCustomer();
        }
    }
}
